<?php namespace app\admin\controller;

class System extends Common{
    //动作
    public function index(){
    //此处书写代码...
        if(IS_POST){
            $res=(new \system\model\System())->systemedit();
           if($res['valid']){
               message($res['message'],'index','success');
           }else{
               message($res['message'],'back','error');
           }
        }
        $systems= Db::table('system')->get();
//        p($systems);die;
        View::with('systems',$systems);
        return view();
    }

}
